package com.cwl.pattern.责任链模式;

/**
 * @program: pattern
 * @description:
 * @author: ChenWenLong
 * @create: 2019-07-08 09:01
 **/
public class ConcreteHandlerB extends Handler {

    @Override
    public void handleRequest(String request) {
        if(request.equals("two")) {
            System.out.println("具体处理者2负责处理该请求！");
        } else {
            if(getNext()!=null) {
                getNext().handleRequest(request);
            } else {
                System.out.println("没有人处理该请求！");
            }
        }
    }
}

